package com.ruoyi.mq.config;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.core.RabbitTemplate;

/**
 * @author jierui
 * @package com.ruoyi.mq.config
 * @date 2021/7/2-10:52
 * @description:
 */
@Slf4j
public class RabbitConfirmReturnCallBack implements RabbitTemplate.ReturnCallback{
    @Override
    public void returnedMessage(Message message, int replyCode, String replyText, String exchange, String routingKey) {
        log.info("--------------ReturnCallback----------------");
        log.info("message = " + message);
        log.info("replyCode = " + replyCode);
        log.info("replyText = " + replyText);
        log.info("exchange = " + exchange);
        log.info("routingKey = " + routingKey);
        log.info("--------------ReturnCallback----------------");
    }

}
